
<style>


    #table_my_toast .trtitle{

        background-color: #58da5d;
        color: #000000;
    }

    #table_my_toast .trdouble {

        background-color:#eeeef3;
        color: #000000;


    }

    #table_my_toast .trsingle {

        background-color:#b0b0f1;
        color: #000000;


    }

    .table_list tbody tr td {

        width: 30px;
    }



</style>
<section class="content-header">
    <h1>第五迭代-失败罚款500元</h1><button id="btn_add" class="button addbtn">+新增</button>
</section>
<section class="content">
    <div class="member-body-top">
        <div class="member-body-top-content">
            <div class="content_list">

                <select id="userselect" class="select hidden">

                </select>


                <button id="query" class="button">刷新</button>






            </div>
        </div>
    </div>
    <div >
</section><!-- /.content -->


        <table class="table_list" id="table_my_toast" style="width: <%= w %>px">
        <tr>
            <td class="trtitle" colspan="2">目标 <span style="color:#f00000">9.8</span>&lt;减重&gt;</td>

            <%

            var datelist= list[0].weight_list;

            for(var i=datelist.length-1;i>=0;i--)
            {
                var date = datelist[i].record_day.substr(5,5);

            %>
            <td rowspan="2"><%=  date %></td>

            <% }  %>
        </tr>
        <tr>
            <td class="trtitle">总减重</td>
            <td class="trtitle">离目标</td>
        </tr>


            <%

            var t=0;

            var trback = "trsingle";

                for(;t<list.length;t++)
                {

                var user = list[t];

                if(t%2 == 0)
                    trback = "trdouble";
                else
                    trback = "trsingle";



            %>

        <tr>
            <td class="<%= trback %>" colspan="2"><%= user.name%> <%= user.target_weight%> &lt;<%= user.weight_diff%>&gt;</td>

            <%  var wlist = user.weight_list;

                var j=wlist.length-1;

                for(;j>=0;j--)
            {
                var weight = "/";

                if( wlist[j].id != -1)
                    weight =  wlist[j].weight;

            %>
            <td class="<%= trback %>" ><%= weight %></td>

            <%  } %>

        </tr>
        <tr>
            <td class="<%= trback %>"><%= user.target_weight_diff%></td>
            <td class="<%= trback %>"><%= user.distance_to_target%></td>



            <%  var wlist = user.weight_list;

                var j=wlist.length-1;

            for(;j>=0;j--)
            {
                var weight = "/";

                if( wlist[j].id != -1)
                    weight =  wlist[j].weight_diff;

            %>

            <% if(weight >=0 ) {  %>

            <td class="<%= trback %>"  style="color: red" >+<%= weight %></td>

            <% } else {  %>

            <td class="<%= trback %>" style="color: green"><%= weight %></td>
            <% } %>

            <%  } %>
        </tr>

            <% } %>

        </table>

    </div>
